module timer_change(
	input clk_1Hz,
	input rst_n,
	input[5:0] minute,
	input[5:0] second,
	output reg[15:0] led_temp
);

	integer i;
	//reg[5:0] temp;
	reg[5:0] min;
	reg[5:0] sec;
	//reg[15:0] led_temp;
	reg[23:0] led_state;

	always @(posedge clk_1Hz or negedge rst_n) begin
		if(rst_n == 1'b0) begin
			min = 6'd0;
			sec = 6'd0;
			led_temp = 16'd0;
			led_state = 24'd0;
		end
		else begin
			min = minute;
			sec = second;
			for(i = 0; i < 4; i = i+1) begin
				//temp = sec % 3;
				led_temp[7:6] = sec % 3;
				//temp = min % 3;
				led_temp[15:14] = min % 3;
				led_temp = led_temp >> 2;
				sec = sec / 3;
				min = min / 3;
			end
			/*for(i = 4; i < 8; i = i+1) begin
				//temp = min % 3;
				led_temp[15:14] = min % 3;
				led_temp = led_temp >> 2;
				min = min / 3;
			end*/
			/*
			led_state = 24'd0;
			for(i = 0; i < 8; i = i+1) begin
				if(led_temp[1:0] == 2'd2) begin
					led_state[23] = 1'd1;
				end
				else if(led_temp[1:0] == 2'd1) begin
					led_state[15] = 1'd1;
				end
				else if(led_temp[1:0] == 2'd0) begin
					led_state[7] = 1'd1;
				end
				else begin
					led_state[23] = 1'd0;
					led_state[15] = 1'd0;
					led_state[7] = 1'd0;
				end
				led_temp = led_temp >> 2;
				led_state = led_state >> 1;
			end
			*/
		end
	end

endmodule
